package com.edwin.myselflearn.untils;

import java.util.Date;
import java.util.Properties;

import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.testng.annotations.Test;

public class DataUtilsTest extends DateUtils{
	@Test
	public void dataUtilsTest(){
		Date date=DateUtils.addDays(new Date(), 1);
		System.out.println(date);
		System.out.println(DateUtils.truncate(date, DateUtils.SEMI_MONTH));
		String pattern=DateFormatUtils.ISO_DATE_FORMAT.getPattern();
		System.out.println(DateFormatUtils.format(date, pattern));
		System.out.println(DateUtils.setDays(date, 1));
		Runtime rt=Runtime.getRuntime();
		System.out.println("总内存"+rt.totalMemory()+"可用内存"+rt.freeMemory());
		Properties p = System.getProperties();
		p.list(System.out);
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return super.toString();
	}
	

}
